package com.grm.controller;

import com.grm.entity.MailDTO;
import com.grm.service.MailService;
import com.grm.service.MailService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: crush
 * @Date: 2021-11-26 16:10
 * version 1.0
 */
@RestController
@RequestMapping("/email")
public class MailController2 {

    @Autowired
    private MailService2 mailService;

    @PostMapping("/send")
    public String send(@RequestBody MailDTO mailDTO){
        mailService.send(mailDTO);
        return "发送成功！！！可能会稍有延迟，请查看邮箱信息！！";
    }
}
